package rensoft.gwt.client.lang;

import java.util.Map;

import static cs.java.lang.Lang.map;

import cs.java.lang.Service;

public class ServiceImpl implements Service {

	private final Map<Class<?>, Object> services = map();

	public <T> T get(Class<T> service) {
		return (T) services.get(service);
	}

	public <T> void serve(java.lang.Class<T> serviceclass, T service) {
		services.put(serviceclass, service);
	}
}
